package com.zxjbyte.yiyi.module.upms.messaging.eventbus.event;

import com.zxjbyte.yiyi.framework.common.enums.EventTypeEnum;
import com.zxjbyte.yiyi.module.upms.domain.entity.UserPO;
import lombok.Data;

/**
 * 用户事件
 *
 * @Author zhangxingjia
 * @Date 2025/3/28 17:49
 * @Version: 1.0
 */
@Data
public class UserEvent {

    private UserPO user;

    private EventTypeEnum eventType;

    public static UserEvent of(final UserPO user, final EventTypeEnum eventType) {
        UserEvent userEvent = new UserEvent();
        userEvent.setUser(user);
        userEvent.setEventType(eventType);
        return userEvent;
    }
}
